//
//  TogetherTypeViewController.m
//  Together_iOS
//
//  Created by QIU Shuang on 2/28/14.
//  Copyright (c) 2014 QIU Shuang. All rights reserved.
//

#import "TogetherTypeViewController.h"
#import "TogetherBaiduMapViewController.h"

@implementation TogetherTypeViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void) loadView {
    [super loadView];
    
    UIView *rootView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    
    // initialize couple reserve button
    UIButton *couple = [[UIButton alloc] init];
    couple.frame = CGRectMake(100, 100, 100, 100);
    [couple setTitle:@"情侣预约" forState:UIControlStateNormal];
    [couple setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [couple addTarget:self action:@selector(coupleReserve) forControlEvents:UIControlEventTouchUpInside];
    [rootView addSubview:couple];
    
    // initialize group reserve button
    UIButton *group = [[UIButton alloc] init];
    group.frame = CGRectMake(100, 250, 100, 100);
    [group setTitle:@"团队预约" forState:UIControlStateNormal];
    [group setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [group addTarget:self action:@selector(groupReserve) forControlEvents:UIControlEventTouchUpInside];
    [rootView addSubview:group];
    
    UIViewController *rootViewController = [[UIViewController alloc] init];
    rootViewController.view = rootView;
    [rootViewController setTitle:@"首页"];
    
    [self pushViewController:rootViewController animated:NO];
}

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void) coupleReserve {
    NSLog(@"hello couple");
    TogetherBaiduMapViewController *mapViewController = [[TogetherBaiduMapViewController alloc] init];
    [self pushViewController:mapViewController animated:YES];
}

- (void) groupReserve {
    NSLog(@"hello group");
}

@end
